home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
get25.zip
/
GET25NEW.DOC
< prev
next >
Wrap
Text File
|
1991-12-01
|
17KB
|
366 lines
GET25NEW.DOC - New features in GET.EXE - Copyright 1991 Bob Stephan
This file summarizes the new and improved features in the various
releases of GET Version 2 through Release 2.5. If you have been using
an older version of GET, you should read this file to find out what
has been changed, and what has been added. Any items of interest
mentioned here are fully described in GET.DOC. This is merely a
brief overview.
Release 2.5:
Release 2.5 is a "bug fix" release. The /Wdiv feature for GET F to
divide a file size by a given divisor that was introduced in Version
2.4 did not work as advertised. This is fixed in 2.5. Apologies
are extended for any inconvenience this may have caused.
Sometimes it is desirable to be able to get the exact size of a
small file. This capability has been added to the GET F file size
function in Version 2.5. It makes use of the /A switch, which can
be thought of mnemonically as meaning All. The syntax is:
GET F[E] filespec [/A] [/Wdiv] [/X]
If /A is specified, All the bytes in the file size will be reported
in the Environment for files up to 655,350 bytes. If over that size,
the value will have an asterisk as the last character indicating that
the size is not valid, but that it is larger than 655,350 bytes. If
the file is 255 bytes or less, the full size will be in the ErrorLevel.
The /Wdiv switch can be used to specify a divisor for larger files so
that the resulting ErrorLevel will be less than 255. The divisor
does not affect the Environment variable.
EXAMPLE:
1. Suppose you have a file of exactly 166,816 bytes. You could see
the following results.
GET F filespec
The Environment is: 163
The ErrorLevel is: 163
GET F filespec /A
The Environment is: 166816
The ErrorLevel is: 255
GET F filespec /A /W1000
The Environment is: 166816
The ErrorLevel is: 166
GET F filespec /A /W1000 /X
The Environment is: 28BA0
The ErrorLevel is: 166
------------------------------------------------------------------
Also, a page back feature has been added to the help screen.
Displaying the help screen by simply entering GET will now pause at
the end of the second screen with the message
Press PgUp to repeat the first screen - Esc, CR, or space bar to exit
Pressing PgUp at this point will start the help screen display over
again. Pressing CR (Enter or Return on the keyboard) will exit and
clear the screen giving you a clear screen to work on. Pressing Esc
or the space bar will exit and leave the second help screen on the
display for reference. The pause will time out in 10 seconds and
return to the DOS prompt automatically.
A useful utility has been added to the GET package. RUN.EXE will
run any .COM or .EXE file and report the ErrorLevel it returns.
Previously many of us had a large BATch file that went something
like: IF ERRORLEVEL 255 SAY 255
IF ERRORLEVEL 254 SAY 254
...
IF ERRORLEVEL 1 SAY 1
where SAY.BAT simply echoed its argument. This was slow and
cumbersome. RUN can greatly speed up the process of testing
programs for return codes. See RUN.DOC for further details.
Finally, a different method of compressing the .EXE file is being
used. It compresses the licensed runtime version, GETRUN.EXE, to
under 4K, so GETNOT is no longer needed and will not be included
in licensed copies.
Release 2.4:
GET.EXE Release 2.4 contains only a few changes from Release 2.3.
There are no bug fixes (none have been reported in 2.3) so if you
don't need any of the new features, you can continue to use 2.3 with
confidence.
There were a very few reports of an apparent ROM BIOS incompatibility
with one or two different systems which involved the method of
displaying the prompt in 2.3. The method was changed from Version
2.2 to permit displaying the prompt in color or reverse video even
with ANSI.SYS loaded. It is now changed again to try to fix this
BIOS incompatibility that so far has appeared only rarely.
Due to the most recent method now being used in Version 2.4, the
maximum prompt length has to be limited to 79 characters if /A is
used. The "prompt" can also be used to send ANSI.SYS escape
sequences to the screen. See information on the /A switch below.
GET R for 'Rithmetic - add or subtract two numbers.
Syntax: GET R[E] [num1] [/Wnum2]
Input: One or two numbers for arithmetic
Process:GET R adds the two numbers
GET RE subtracts the second from the first
Output: Arithmetic result in Environment and ErrorLevel
If only one number is given, the other number defaults to 0.
Max number of digits for each number is 4.
Thus a character representation of a number can be converted
to a number in the ErrorLevel.
Example: A loop counter
SET COUNT=0
:LOOP
GET R %COUNT% /W1 /VCOUNT=
Echo The count is %COUNT%
IF NOT ERRORLEVEL 10 GOTO LOOP
If the result is greater than 255, the ErrorLevel is modulo 256.
256=0, 257=1, ..., 511=255, 512=0, etc.
No negative numbers are recognized. If a larger number is
subtracted from smaller, the result is the difference + 65536.
Example: GET RE 10 /W20
The ErrorLevel is 246
The Environment is 65526
SWITCHES:
/A if the /A switch is not included, the prompt will be displayed
in such a manner that ANSI sequences can be used for screen
control. This restores compatibility with Version 2.2 for
prompting and using ANSI screen control sequences. The "prompt"
will always be sent to the screen even if standard output is
redirected with DOS redirection (>). Without /A the prompt can
be as long as will fit on the DOS command or BATch line which is
limited to 128 characters total. With /A, the prompt is limited
to 79 characters.
/T TRIM switch for GET S, GET Z, and GET HE.
/TL or /T- will trim leading blanks.
/TR or /T+ will trim trailing blanks.
/V- will suppress creation of the Environment variable completely.
A side effect of /V- is that SET GET?=ON will have no effect.
Since the search of the Environment is being completely bypassed,
GET will not be able to check for the GET? variable.
Two additions to the GET F command:
/X Previously GET F always put the filesize in the Environment in
hexadecimal. Now it will be in decimal kilobytes, unless the /X
for heX switch is included in which case it will be the full
size in hex as before.
A divisor can be provided for the GET F file size command similar to
the divisors permitted for GET K and GET Q.
Syntax: GET F filespec /Wnum
NOTE: The use of GET F to test for the existence of a directory is
valid only for subdirectories, and not for any root directory.
Since DOS does not recognize the root directory as a file, commands
such as GET F \, GET F c:\, GET F c:, etc. are not valid. Also,
if there is an error (no Environment variable) and the ErrorLevel
is 15 it means that an invalid drive was specified. These items
were true in previous versions of GET, but were not described
completely in the documentation. Also, although it is a
documented procedure in MS DOS 5.0, do not use the NUL device to
check for a directory if any users might be using DR DOS 5.0. DR
DOS 5 thinks that the NUL (and other) devices exist even in
non-existent directories. It may be that a few other versions of
DOS do not support the NUL device method of checking, but GET will
work with them all.
There is a minor improvement to the GET UE command. Previously the
value place